//获取活动页信息
function actInfo(urlCode, callback) {
  wx.request({
    url: getApp().globalData.host + 'act/actInfo',
    header: getApp().globalData.header,
    data: { urlCode: urlCode},
    success: function (res) {
      if (typeof (res.data) != 'undefined' && res.data != null) {
        callback(res.data);
      }
    }
  })
}

//获取活动页商品列表
function actItems(actId, callback) {
  wx.request({
    url: getApp().globalData.host + 'act/actItems',
    header: getApp().globalData.header,
    data: { actId: actId },
    success: function (res) {
      if (typeof (res.data) != 'undefined' && res.data != null) {
        callback(res.data);
      }
    }
  })
}


module.exports = {
  actInfo: actInfo,
  actItems: actItems
}
